Skip to content

Conversation

@abudlong
Copy link
Contributor

No description provided.

@abudlong abudlong requested a review from eigerx April 10, 2025 22:24
Copy link

@eigerx eigerx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only real comment is that if you could put linter edits on a separate commit next time (at least until after review) that would be swell. Thanks!!

# interpolation length for WCS evaluations.
self.warp.interpLength = 100
self.warp.warpingKernelName = 'lanczos3'
self.warp.warpingKernelName = "lanczos3"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment, usually linter stuff is at least put on its own commit so reviewers can look at new additions only, but I'm glad you did it because this file clearly needed it!

Record of the tract and patch of each coaddExposure.
coaddExposures : `dict` [`int`, `list` of \
[`lsst.daf.butler.DeferredDatasetHandle` of \
`lsst.afw.image.Exposure` or
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lsst.afw.image.Exposure or lsst.afw.image.Exposure ? I assume there is a small typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! It looks a bit odd since it's on two lines, but the first option is a DeferredDatasetHand of an lsst.afw.image.Exposure and the other option is just an lsst.afw.image.Exposure . I hope that clarifies things!

dataId = coaddRef.dataId
patchWcs = skymap[dataId['tract']].getWcs()
patchBBox = skymap[dataId['tract']][dataId['patch']].getOuterBBox()
subfilter = dataId["subfilter"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like everything up till this point was linting and this is the meat of the PR, correct? let me know if I missed something above.

patchCorners = patchWcs.pixelToSky(geom.Box2D(patchBBox).getCorners())
patchPolygon = afwGeom.Polygon(wcs.skyToPixel(patchCorners))
if patchPolygon.intersection(detectorPolygon):
overlappingArea += patchPolygon.intersectionSingle(detectorPolygon).calculateArea()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this line is the same? How did this used to work differently?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This is the same line. The difference is when appending dataIds. Since we have three subfilters, we don't want to append the same dataId three times, so we only keep the one associated with subfilter=0. This is in line ~734.

@abudlong abudlong merged commit 216c3ac into main Apr 22, 2025
2 checks passed
@abudlong abudlong deleted the tickets/DM-49344 branch April 22, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants